#ifndef CARDPOOL_H
#define CARDPOOL_H

#include "abstractcard.h"
#include "reservedwords.h"

#ifdef IVIEWOBJECTDATA_H
#include "IViewObjectData.h"
#endif

#include "creaturecard.h"
#include "landcard.h"
#include "abilitycard.h"

#include <QStandardItemModel>

#include <QObject>
#include <QFile>


class CardPool : public QObject
{
    Q_OBJECT
public:
    explicit CardPool(QString filename = "");

    AbstractCard *AddCard (AbstractCard *);
    void RemoveCard(int );
    void RemoveCard(AbstractCard *);
    AbstractCard *getRandomCard(bool );

    void changeCard(const QModelIndex &, const QVariant &, int);

    int getCount();
    QStandardItemModel *model;
    QString toXmlDefinition();
    void fromXmlDefinition(QDomDocument *);
    void fromXmlDefinition(QString);
    void loadFromFile(QString );

    static AbstractCard *CreateCard(QDomNode);

private:
    QVector<AbstractCard *> m_CardPool;
#ifdef IVIEWOBJECTDATA_H
    ICardViewObjectData *m_ViewObject;
#endif

signals:

public slots:

};

#endif // CARDPOOL_H
